package com.music.service.folders.constants;

public class FolderSQLQueries {
	public static final String ADD_FOLDER =
		"insert into folders(created_member_id,folder_name,state,creation_date,last_update_date) values" +
		"(?,?,?,sysdate,sysdate)";
	
	public static final String DELETE_FOLDER = 
		"update folders set state = ? where created_member_id = ? && folder_id = ?  && state = ?";
	
	public static final String VIEW_ACTIVE_FOLDERS = 
		"select folder_id,created_member_id,last_added_album_id,state,folder_name,creation_date,last_update_date from folders " +
		"where created_member_id = ? && state = ?";
	
	public static final String EDIT_FOLDER_NAME = 
		"update folders set folder_name = ? where created_member_id = ? && folder_id = ? && state = ?";

	public static final String CHECK_FOLDER_MEMBER_PERMISSION = 
		"SELECT count(*) as count FROM folders where folder_id = ? && created_member_id = ? && state = ?";
	
	public static final String ADD_ALBUM_TO_FOLDER = 
		"insert into folder_albums_r(folder_id,album_id,creation_date,last_update_date) " +
		"values ( ?,?,sysdate,sysdate)";
	
	public static final String DELETE_ALBUM_FROM_FOLDER =
		"delete from folder_albums_r where folder_id = ? && album_id = ?";
		
}